Repository navigation
[crowdstrike.fdr] Use 'params' for data table in script processors - #3492
Merged
Merged
Conversation
In my local testing this changes the avg execution time of the categorize-events script processor the from 71,092 ns to 5,810 ns. When the map is built inside the script it must be created each time. By using params the same map is reused, but care must be taken to ensure that the params data is modified. That involves making copies of any mutable lists. Remove script
Don't use null-safe operation when ctx can never be null
Avoid the need add escapes.
There are no sub-pipelines so remove that part of the message.
andrewkroh
marked this pull request as ready for review
June 8, 2022 21:32
|
Pinging @elastic/security-external-integrations (Team:Security-External Integrations) |
🌐 Coverage report
|
efd6
approved these changes
Jun 8, 2022
This was referenced Nov 28, 2022
orestisfl
pushed a commit
to orestisfl/integrations
that referenced
this pull request
May 15, 2026
…lastic#3492) Prior to this change the data type (HashMap) was constructed on each script processor iteration. By using params the same map is reused, but care must be taken to ensure that the params data is not modified. That involves making copies of any mutable lists. Based on local testing this changes the avg execution time of the categorize-events script processor the from 71,092 ns to 5,810 ns. * Replace ctx?. with ctx. Don't use null-safe operation when ctx can never be null * Use triple-brace in mustache templates Avoid the need to add escapes. * Add tag to all script processors. * Use params for dns request type * Adjust error message There are no sub-pipelines so remove that part of the message. * Reduce high failure count on 5_date_date-context-timestamp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Prior to this change the data type (HashMap) was constructed on each script processor iteration. By using
paramsthe same map is reused, but care must be taken to ensure that theparamsdata is not modified. That involves making copies of any mutable lists.Based on local testing this changes the avg execution time of the categorize-events script processor the from 71,092 ns to 5,810 ns.
Checklist
changelog.ymlfile.Screenshots
This was done from a containerized ES running on my local machine so don't read into the overall numbers. The relative difference in the categorize-events script is the important part.
Before:
After: